package home.work;

import java.util.Optional;

public class Report {

    public static String report(Integer num) {
        if (num.toString().contains("3")) {
            return "Fizz";
        }

        StringBuilder builder = new StringBuilder();
        if (num % 3 == 0) {
            builder.append("Fizz");
        }
        if (num % 5 == 0) {
            builder.append("Buzz");
        }
        if (num % 7 == 0) {
            builder.append("Whizz");
        }
        String result = builder.toString();
        if (result.length() > 0) {
            return result;
        }
        return num.toString();
    }
}
